1. Technical Field of the Invention
This invention relates generally to the field of managing directory listing caption sets, and in particular, to navigation, storage and retrieval filtering of telephone listing caption sets in a relational database.
2. Description of Related Art
Telephone directory listings may contain several xe2x80x9ccaption setsxe2x80x9d per listing. xe2x80x9cCaption setsxe2x80x9d are also referred to as xe2x80x9cindentsxe2x80x9d. Each caption set may contain several children and further children of children in a hierarchal manner. A large listing such as a university, a department store or a hospital, for example, may contain several hundred indents nested at several different levels. Although a relational database, such as DB2, has bill-of-material queries for xe2x80x9cparts-of-partsxe2x80x9d queries, it is too slow for typical directory assistance queries, does not provide for advanced matching rules or filters needed for caption sets, and does not provide for built-in navigation of the hierarchy without executing subsequent time consuming searches.
Although a department store listing may have both a xe2x80x9cmen""sxe2x80x9d department and a xe2x80x9cshoexe2x80x9d department, the query may need to match against a caption set indent that is a xe2x80x9cmen""s shoexe2x80x9d department, determine it""s parent and children indents if any, and correctly display the appropriate caption set indents in the appropriate order and indentation levels in a fast and efficient manner. The problem is further compounded when listing data needs to be joined from several tables because of one-to-many and many-to-many relationships, which are typical situations. Telephone directory listings are constantly updated on both a listing and an indent level and the indexing schemes and data design schemes must accommodate these changes.
The inventive arrangements taught herein define a method for indexing and storing hierarchical caption sets (indents) within a relational database, for example a database of telephone directory listings, efficiently applying matching rules, identifying nested parent-child hierarchies, and properly sorting and displaying listings and their indents according to the appropriate levels of indents found by the matching rules for a specific query.
In accordance with the inventive arrangements, a pre-index table for the database is created. The varying levels of indentation, or caption sets, and the listings are assigned unique identifiers. The table is populated with parsed words from the listings, together with the unique identifiers. Queries are undertaken in the pre-index table, wherein the indentation data makes it possible to identify the correct caption set or sets irrespective of the order of indentation in different listings for the same words or products. The unique identifiers are then used as numeric keys to index the table to the entire relational database, and thus retrieve data which is stored exclusively in the relational database on the basis of a much faster and more efficient query through the table. The retrieved data can include, for example, telephone numbers, address, hours of operation, credit cards accepted and other kinds of relevant data.
A method for managing hierarchal listings of indented caption sets in a relational database of complete listings, in accordance with an inventive arrangement, comprises the steps of: uniquely identifying the listing by a listing object identifier (LOID); uniquely identifying each caption set within the listings and each level of indentation for each caption set by a caption set object identifier (CSOID); parsing individual words of each listing; creating a relational table indexed by the relational database with an entry for each of the parsed words, each of the entries including a respective LOID and CSOID for each parsed word; searching for caption sets in the relational database by searching the parsed words in the relational table; and, using the LOID and the CSOID as index links to the relational database.
The method can further comprise the step of retrieving data stored exclusively in the relational database according to the LOID and the CSOID index links, whereby the data stored exclusively in the relational database can be retrieved more efficiently by indirect queries directed to the relational table than direct queries to the relational database. The method can still further comprise the steps of: redundantly identifying the level of indentation for each caption set by an independent indentation object identifier (IOID); including a respective IOID in each entry; and, using the IOID as a further index link to the relational database. The listings can be telephone directory listings and the data stored exclusively in the relational database can comprise telephone numbers. The method can further comprise the step displaying in full, with proper indentation, any desired portion of any of the listings from the retrieved data.
A method for retrieving data from hierarchal telephone directory listings represented as persistent objects in a complete relational database, caption sets of identical words having different hierarchal relationships in different ones of the listings, in accordance with another inventive arrangement, comprises the steps of: representing each listing, parsed words in each listing, the caption set and each indentation of each caption set as persistent objects in a pre-index table; linking the table to the relational database with at least one unique key; searching for telephone numbers in the database by searching the caption sets in the table; and, retrieving telephone numbers from the database, based upon the at least one unique key returned by the searching in the table.
The method can further comprise the step of linking the table to the relational database with a listing object identifier (LOID) uniquely identifying each listing and a caption set object identifier (CSOID) uniquely identifying each caption set within each listing and each level of indentation for each caption set. The LOIDs and the CSOIDs can be used for navigating within the caption sets of the table.
The method can further comprise the step of further linking the table to the relational database with an indentation object identifier (IOID) redundantly identifying the level of indentation for each caption set. The IOIDs can also be used for navigating within the caption sets of the table.
A method for managing hierarchal listings of caption sets, in accordance with yet another inventive arrangement, comprises the steps of: representing each caption set of each listing as a persistent object in a relational database based on a unique identification; uniquely identifying all indentations of each caption set of each listing by a caption set object identification (CSOID); and, representing each list as a persistent object in a relational database based on the CSOID.
The method can further comprise the step of navigating within the caption sets using the CSOIDs. The navigating step can comprise traversing all parent-child relationships of the caption sets hierarchally, including nested indents.